Skip to content

Add distributed Jacobi preconditioning#68

Open
sanjanag wants to merge 3 commits intolinkedin:masterfrom
sanjanag:dist-jacobi-precondition
Open

Add distributed Jacobi preconditioning#68
sanjanag wants to merge 3 commits intolinkedin:masterfrom
sanjanag:dist-jacobi-precondition

Conversation

@sanjanag
Copy link
Copy Markdown
Contributor

Summary

Adds dist_jacobi_precondition for column-partitioned constraint matrices,
enabling Jacobi preconditioning in multi-node / multi-GPU settings. Each rank
holds a column slice; full row L2-norms are reconstructed via an
all_reduce(SUM) over per-rank partial sums of squares, then each rank scales
its local slice in place. Rank 0 optionally scales b and persists the row
norms for later inversion.

Test plan

  • Existing single-process precondition tests still pass
  • New no-dist guard test passes on CPU
  • New torchrun-gated tests cover correctness of global norms, A scaling,
    b scaling, and the norm-save path (skipped without torchrun + 2 GPUs)

sanjanag and others added 3 commits April 27, 2026 12:32
dist_jacobi_precondition reconstructs full row L2-norms from a
column-partitioned matrix via all_reduce(SUM) over per-rank partial
sums of squares, then scales each rank's local slice in place. Rank 0
optionally scales b and persists the row norms.

Includes a no-dist guard test plus two torchrun-gated tests covering
correctness of the global norms / A scaling / b scaling and the
norm-save path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant